package com.engine.salary.service;

import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO;
import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO;
import com.engine.salary.entity.datacollection.param.*;
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
import com.engine.salary.util.page.PageInfo;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.time.YearMonth;
import java.util.List;
import java.util.Map;

/**
 * 数据采集-其他免税扣除
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
public interface OtherDeductionService {

    /**
     * 通过id获取单条其他免税扣除记录
     *
     * @param id
     * @return
     */
    OtherDeductionPO getById(Long id);

    /**
     * 数据采集-其他免税扣除列表
     *
     * @param queryParam
     * @return
     */
    PageInfo<OtherDeductionListDTO> listPage(OtherDeductionQueryParam queryParam);

    /**
     * 获取数据采集-其他免税扣除详情
     *
     * @param queryParam
     * @return
     */
    PageInfo<OtherDeductionRecordDTO> recordListPage(OtherDeductionQueryParam queryParam);

    /**
     * 导出
     *
     */
    XSSFWorkbook export(OtherDeductionQueryParam queryParam);

    /**
     * 导出详情
     *
     */
    XSSFWorkbook exportDetail( OtherDeductionQueryParam queryParam);

    /**
     * 下载导入模板
     *
     * @param param
     * @return
     */
    XSSFWorkbook downloadTemplate(OtherDeductionQueryParam param);

    /**
     * 预览
     */
    Map<String, Object> preview(OtherDeductionImportParam importParam);

    /**
     * 导入数据
     */
    Map<String, Object> importData(OtherDeductionImportParam importParam);



    /**
     * 获取其他免税扣除数据
     *
     * @param declareMonth
     * @param employeeIds
     * @return
     */
    List<OtherDeductionPO> getOtherDeductionList(YearMonth declareMonth, List<Long> employeeIds, List<Long> taxAgentIds);

    /**
     * 编辑数据
     */
    void editData(OtherDeductionParam otherDeductionParam);

    /**
     * 新增数据
     */
    void createData(OtherDeductionParam otherDeductionParam);

    /**
     * 删除所选数据
     */
    void deleteSelectData(AddUpDeductionRecordDeleteParam deleteParam);

    /**
     * 一键清空数据
     */
    void deleteAllData(AddUpDeductionRecordDeleteParam deleteParam);

    /**
     * 获取数据
     */
    OtherDeductionRecordDTO getOtherDeduction(OtherDeductionParam otherDeductionParam);

    String extendToLastMonth(OtherDeductionExtendLastParam param);

    List<OtherDeductionListDTO> listAuth(OtherDeductionQueryParam queryParam);
}
